import { request } from '@/service/request';

// 首页-省设备数量
export function ProvinceProject() {
  return request({
    url: '/api/dashboard/OverviewProvinceProject ',
    method: 'get'
  });
}

// 养殖池-获取鱼池列表
export function farmList(params: any) {
  return request({
    url: '/api/farm/getList',
    method: 'get',
    params
  });
}
// 养殖池-获取告警列表
export function AlarmRecord(params: any) {
  return request({
    url: '/api/analogAlarmRecord/getList',
    method: 'get',
    params
  });
}
// 养殖池-标记已读
export function AnalogAlarmRecord(data: any) {
  return request({
    url: '/api/analogAlarmRecord/updateReadState',
    method: 'put',
    data
  });
}

// 养殖池-获取传感器数
export function deviceInfo(params: any) {
  return request({
    url: '/api/deviceInfo/OverviewCategoryDeviceCount',
    method: 'get',
    params
  });
}

// 养殖池详情-获取报警信息
export function OperList(params: any) {
  return request({
    url: '/api/deviceInfo/getOperList',
    method: 'get',
    params
  });
}

// 养殖池详情-传感器数据
export function DeviceInfoList(params: any) {
  return request({
    url: '/api/deviceInfo/getList',
    method: 'get',
    params
  });
}

// 养殖池详情-传感器数据
export function getVideoMonitorDataApi(params: any) {
  return request({
    url: '/api/videoMonitor/getVideoMonitorData',
    method: 'get',
    params
  });
}

// 养殖池详情-趋势图
export function HistoryData4Curve(data: any) {
  return request({
    url: '/api/deviceInfo/historyData4Curve',
    method: 'post',
    data
  });
}

// 控制传感器
export function SwitchController(data: any) {
  return request({
    url: '/api/deviceInfo/switchController',
    method: 'put',
    data
  });
}

// 自由投喂
export function freeFeed(data: any) {
  return request({
    url: '/api/deviceInfo/freeFeed',
    method: 'put',
    data
  });
}
